1. Technical Field
The present invention is directed to a system, apparatus and method for supporting multiple file systems in boot code. In particular, the present invention is directed to a system, apparatus and method in which boot code of a computer performs an identification of a file system utilized by a boot disk and is capable of loading an associated operating system based on the identification of the file system.
2. Description of Related Art
With known personal computers (PCs), an operating system must be loaded by the system before file data can be accessed by the personal computer. Modern computers have programs stored in read only memory (ROM) which are retained even when power to the computer is discontinued. These programs, also known as Basic Input Output Systems (BIOS), are used to load the operating system of the personal computer. The BIOS is an essential set of routines in a PC which provides an interface between the operating system and the hardware.
On startup, the BIOS tests the system and prepares the computer for operation by querying its own small Complementary Metal Oxide Semiconductor (CMOS) memory bank for drive and other configuration settings. The BIOS searches for other BIOS""s on plug-in boards and sets up pointers (interrupt vectors) in memory to access those other BIOS routines. It then loads a boot block and passes control to it.
The BIOS is capable of loading a single disk block into memory and passing control to it. This disk block is known as the boot block. A boot block is a reserved data block on a disk that is used to load the operating system. On startup, the BIOS loads the master boot record (MBR), which is in the boot block, into memory. The MBR contains pointers to the first sector, i.e. the boot sector, of the partition that contains the operating system. The boot sector contains the instructions that cause the computer to boot the operating system. The operating system is then utilized to access the computer""s file system.
A file system is a collection of files, blocks, directories, and file descriptors located on one logical disk. A logical disk may be a physical disk, part of a physical disk, or several physical disks.
FIG. 1 is a generalized illustration of a file system 100 for a hard disk. As shown in FIG. 1, the file system 100 typically is comprised of a boot block 110, a file system descriptor block 120, a file descriptors block 130, a file data blocks 140. The boot block 110 has been described above.
The file system descriptor block 120 contains information identifying the total size of the file system, the size of the file descriptor block, the first free block, the location of the file descriptor of the root directory, the time the file system was created, last modified, and last used, and other system meta-data. The file descriptor block 130 contains file descriptors which are data structures maintained by the operating system that contain all the meta-data the operating system needs to record about a file. The file descriptors include such information as the last time the file was read, the last time the file was written, the length of the file, the location of the file data on the disk, the protection status of the file, and the like. The file data blocks 140 contain the actual file data.
As shown in FIG. 2, in order to access file data on a computer system, the computer""s BIOS, having a BIOS loader routine 210, first loads the boot block 110. The boot block 110, i.e., the operating system loader 220, contains the MBR which points to a location for the boot sector of the operating system. The operating system loader loads the boot sector and then passes control to the operating system 230. The operating system 230 is then used to access the file data 240.
Thus, known personal computers have programs stored in ROM, i.e. BIOS, which load an operating system based on a location of the operating system boot sector identified by the master boot record. Even if the personal computer contains a hard drive having multiple partitions with multiple operating systems, the master boot record determines which operating system is loaded by identifying the boot sector of the operating system to be loaded. The partition used during booting, and thus, the operating system that is booted, may be modified by changing the BIOS to indicate a different boot partition.
In view of the above, known personal computers are limited in that they may only load an operating system that is designated as the boot operating system in the master boot record. Thus, the operating system that is to be booted must be determined prior to a boot attempt.
The above description is applicable to personal computers. Network computers differ from personal computers in that network computers do not contain a BIOS. A network computer is a desktop computer that provides connectivity to intranets and/or the Internet.
It is designed as a xe2x80x9cthin clientxe2x80x9d that downloads all applications from the network server and obtains all of its data from and stores all changes back to the server.
The network computer (NC) is similar to a diskless workstation and does not have floppy or hard disk storage. The network computer may contain a minimal amount of memory in which a boot code and an operating system may be stored. The boot code is specific to the particular operating system and is similar to the operating system loader in the BIOS of a personal computer.
When a network operator wishes to add a network computer to an existing network, the operator must first configure the network computer by loading the appropriate boot code and operating system into the network computer for the particular file system used by the network. Thus, the network computer, once configured, is only able to operate with a network using a file system that is supported by the boot code and operating system loaded into the network computer.
If the network computer is to be used with a different network file system, the boot code and operating system must be replaced with new boot code and a new operating system. Just as with the personal computer described above, the operating system that is to be loaded during a boot of the network computer must be determined prior to a boot attempt.
Thus, it would be advantageous to have a more versatile computer that is capable of determining which operating system to load at the time of a boot attempt.
The present invention provides a system, apparatus and method for supporting multiple file systems in boot code. The boot code according to the present invention searches a boot disk to determine the file systems used by the boot disk. There may be one or more file systems on the boot disk. If there are multiple file systems, there are multiple partitions of the boot disk and may be multiple operating systems corresponding to the partitions.
Once the boot code determines the file systems used on the boot disk, the boot code is able to identify corresponding operating systems for the file systems. Based on the identification of the operating systems, the boot code is able to locate a boot sector for the operating systems and load an appropriate operating system. The boot code then turns over control of the computer system resources to the loaded operating system.
In the case where there are multiple partitions and multiple operating systems, the boot code according to the present invention is capable of selecting an operating system from the multiple operating systems based on a selection criteria. In one embodiment, the selection criteria may be a priority assigned to the operating systems. In another embodiment, the selection may be based on a selection made by a user of the computer system.
In the case where there are multiple operating systems using the same file system, the present invention is capable of determining which operating system to load by analyzing a boot block of the file system to determine a corresponding operating system.
Thus, the present invention provides a system, apparatus, and method which is capable of determining an operating system to be loaded during a boot operation at the time of the boot attempt rather than prior to the boot attempt. Other features and advantages of the present invention will be described in, or will be apparent from, the following description of the preferred embodiments.